﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using UniversityStudentManagemnetSystem.DAO.DAL;
using UniversityStudentManagemnetSystem.DAO.Gateway;

namespace UniversityStudentManagemnetSystem.BLL
{
    public class StudentManager
    {
        StudentGateway gateway = new StudentGateway();
        public DataTable GetAllStudents()
        {
            DataTable table=gateway.GetAllStudents();
            return table;
        }

        public DataTable GetAllStudentsFor(int selectedDepartment)
        {
            return gateway.GetAllStudentsFor(selectedDepartment);
        }

        public Student GetStudentForRegNoOrEmail(string regNoOrEmailorContactNo)
        {
            if (regNoOrEmailorContactNo!="")
            {
                return gateway.GetStudentPersonalInformationFor(regNoOrEmailorContactNo);  
            }
            else
            {
               throw  new Exception("Please Enter Any Choice!");
            }
       
        }
    }
}